package com.wangxin.study8.consumers;

import com.wangxin.study8.constructor.Person;

import java.util.function.Consumer;

/**
 * @ClassName ConsumersMain
 * @Description Consumer 接口表示要对单个输入参数执行的操作。
 * @Author jojo.wang
 * @Date 2019-04-25 15:30
 * @Version 1.0
 **/
public class ConsumersMain {
    public static void main(String[] args) {
        Consumer<Person> greeter = p-> System.out.println("hello:"+p.getStr1());
        greeter.accept(new Person("wang","xin"));
    }
}
